Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add options in base install #2

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

asergiop21
Copy link
Collaborator

No description provided.

@@ -1,11 +0,0 @@
deployer ALL= NOPASSWD: /bin/systemctl start unicorn
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No lo borraría a eso, si vemos que el usuario está creado no lo metemos, caso contrario si.

dir_nginx=/etc/nginx

echo "Instalación Paquete NGINX"
#echo "Instalación Paquete NGINX"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todos estos echo comentados, los pasaría a comentarios normales y en inglés.

base/install_app_base.sh Outdated Show resolved Hide resolved
Comment on lines 12 to 25
while getopts u:p: option
do
case "${option}" in
u) user=${OPTARG};;
p) mawidabp_path=${OPTARG};;
:) echo "INVALID";;
\?) echo "Argumento -${option} erroneo use:
[u] Nombre de usuario
[p] Directorio de instalacion
"
exit;;

esac
done
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Esto se suele poner así:

while getopts u:p: option; do
  case $option in
  esac
done

Y el :) se le pone el mensaje "requiere un argumento". También se pone en eso dos casos un exit 1, así indicás error.


esac
done
shift $((OPTIND -1))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

¿Para qué hiciste esto?

Comment on lines 80 to 81
#adduser deployer -G nginx
#passwd deployer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acá haría lo que hablamos, todo esto en un if si no existe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants